#!/bin/bash
log=`date +"%Y-%m-%d_%H-%M-%S ----"`
log2=`date +"%Y-%m-%d_%H-%M-%S ----"`
pid=`ps -ef |grep java|grep bjmashbing-sysio-1.0-0.1  |awk '{print $2}'`
if [ $pid ]; then 
    echo $log :App  is  running pid=$pid>>/home/ubuntu/mylog2.log
    #kill -9 $pid
    #tail -f >> /home/ubuntu/fcm/nohup.out	 
else
echo $log2 :App  is not  running>>/home/ubuntu/mylog2.log
/usr/local/jdk-14.0.2/bin/java -jar /home/ubuntu/fcm/pushserver2/bjmashbing-sysio-1.0-0.1.jar
#tail -f nohup.out
fi
